<html lang="zh-cn" ng-app>

	<head>
		<!-- Meta, title, CSS, favicons, etc. -->
		<meta charset="utf-8">
		<title>
			TEST
		</title>
		<link href="./css/bootstrap.min.css" rel="stylesheet">

		<link rel="stylesheet/less" type="text/css" href="./css/style.less">
	</head>

	<body ng-controller="TestAllCrl">
		<div class="page-header">
			<h4>
        <select id="testServer" ng-model="selectedServer" ng-options="server for server in servers">
        </select>
        <select id="testAuthorizes">
            <option ng-repeat="authority in authorities">
                {{authority.name}}
            </option>
        </select>
        <select id="testFile">
            <option ng-repeat="fileName in testFiles">{{fileName}}</option>
        </select>
        <button type="button" id="start" class="btn btn-sm btn-success">运行</button>
    </h4>
		</div>
		<!--<button type="button" class="btn btn-success" ng-click="start()">运行</button>-->
		<!--<div class="test-header">-->
		<!--<div class="test-header-content">-->
		<!--<button type="button" class="btn btn-primary btn-sm" name="group">全部收起</button>-->
		<!--<button type="button" class="btn btn-primary btn-sm" name="success">隐藏成功</button>-->
		<!--</div>-->
		<!--</div>-->
		<div class="container container-margin-top">
			<div class="col-md-10" role="main">
				<!--总进度条-->
				<div class="progress">
					<div class="progress-bar" role="progressbar" aria-valuenow="{{stepCount * 100 /runStepCount }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ stepCount* 100 / runStepCount}}%;">
						<span class="sr-only">{{stepCount * 100 /runStepCount }}%</span>
					</div>
				</div>
				<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
					<!--每个组-->
					<div class="panel panel-{{service.state}}" ng-repeat="service in groups">
						<div class="panel-heading" role="tab" id="PH{{service.id}}">
							<h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#{{service.id}}" aria-expanded="true"
                           href="#PD{{service.id}}" aria-controls="PC{{service.id}}">
                            {{service.name}}--->{{service.dependencies}}
                        </a>
                    </h4>
						</div>
						<div id="PD{{service.id}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
							<div class="panel-body">
								<div class="panel-group" id="operation-accordion" role="tablist" aria-multiselectable="true">
									<!--每个url-->
									<div class="panel panel-{{operation.state}}" ng-repeat="operation in service.urls">
										<div class="panel-heading" role="tab" id="PH{{operation.id}}">
											<h4 class="panel-title">
                                        <a data-toggle="collapse" data-parent="#{{operation.id}}" aria-expanded="true"
                                           href="#PD{{operation.id}}" aria-controls="PC{{operation.id}}">
                                            <span class="http-method-{{operation.method}}">{{operation.method}}</span>{{operation.name}}@{{operation.path}}--->{{operation.dependencies}}
                                        </a>
                                    </h4>
										</div>
										<div id="PD{{operation.id}}" class="panel-collapse collapse" role="tabpanel" aria -labelledby="headingOne">
											<div class="panel-body">
												<ul class="list-group">
													<!--每个url下的一个case-->
													<li class="list-group-item list-group-item-{{cas.state}}" ng-repeat="cas in operation.cases">
														<div class="accordion-group">
															<div class="accordion-heading">
																<a class="accordion-toggle collapsed" data-toggle="collapse" href="#{{cas.id}}"  aria-expanded="false">{{cas.description}}</a>
															</div>
															<div id="{{cas.id}}" class="accordion-body  collapse" aria-expanded="false">
																<div class="accordion-inner">
																	<pre class="text-danger" ng-if="cas.state=='danger'">{{cas.result}}</pre>
																	<pre class="text-default" ng-if="cas.state=='danger'">{{cas.expectation}}</pre>
																	<pre class="text-success" ng-if="cas.state=='success'">{{cas.result}}</pre>
																</div>
															</div>
														</div>
													</li>
												</ul>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="col-md-2">
				<div class="affix" data-offset-top="20px" id="navbar">
					<label class="checkbox">
						 <input type="checkbox" ng-model="isAsync" name="isAsync">是否异步
					</label>
					<ul class="nav">
						<li class="nav-li" ng-repeat="service in groups">
							<a href="#PH{{service.id}}" class="a-ul" style="font-size: 14px;"><strong>{{service.name}}</strong></a>
							<ul class="nav nav-ul">
								<li class="nav-ul-li" ng-repeat="url in service.urls">
									<a href="#PH{{url.id}}" class="a-li">{{url.name}}</a>
								</li>
							</ul>
						</li>
					</ul>
					<a class="back-to-top" href="#top">
                返回顶部
            </a>
				</div>
			</div>
		</div>
		</div>
		<script src="./js/jquery.min.js"></script>
		<script src="./js/bootstrap.min.js"></script>
		<script src="./js/angular.min.js"></script>
		<script src="./js/cartman-test.js" type="text/javascript"></script>
		<script src="./testAuthorities.js"></script>
		<script src="./js/controller.js" type="text/javascript"></script>
		<script src="./js/less.min.js" type="text/javascript"></script>
	</body>

</html>